import 'package:acgn_pioneer/constants/enum_constant.dart';

import 'base_model.dart';

/// 章节插槽数据
class ChapterSlotModel extends BaseModel {
  /// 宽高
  double width;
  double height;

  /// 插槽类型
  ReaderSlotType type;

  /// 插槽自有数据
  dynamic data;

  /// 是否前置（插在图片前面还是后面）
  bool isBefore;

  ChapterSlotModel(
      {this.height, this.width, this.type, this.data, this.isBefore = false});

  ChapterSlotModel.fromJson(Map<String, dynamic> data);

  @override
  Map<String, dynamic> toJson() {
    return {
      'width': width,
      'height': height,
      'type': type,
      'isBefore': isBefore
    };
  }
}
